

class Outer {
    public int data1 = 1;
    public int data2 = 2;
    public static int data4 = 500;
    public static int data3 = 3;

    //定义静态内部类
    static class Inter {
        public int data4 = 4;
        public static int data5 = 5;

       public void print() {
           Outer outer = new Outer();
           System.out.println(data4);


          /* System.out.println(outer.data5);
           System.out.println(outer.data1);
           System.out.println(outer.data2);
           System.out.println(data3);
           outer.func2();*/
       }
        public void func() {
            System.out.println("我是静态内部类的方法~");
        }
        public Inter() {
            System.out.println("我是静态内部类的构造方法！");
        }
    }
    public void func2() {
        System.out.println("我是外部类的方法~");
    }
}

public class Test {
    public static void main(String[] args) {
        Outer.Inter inter = new Outer.Inter();
        //System.out.println(inter.data4);
        inter.print();
    }
}
